
  ___  ____  ____  ____  ____ (R)
 /__    /   ____/   /   ____/
___/   /   /___/   /   /___/   15.1   Copyright 1985-2017 StataCorp LLC
  Statistics/Data Analysis            StataCorp
                                      4905 Lakeway Drive
     MP - Parallel Edition            College Station, Texas 77845 USA
                                      800-STATA-PC        http://www.stata.com
                                      979-696-4600        stata@stata.com
                                      979-696-4601 (fax)

32-user 64-core Stata network perpetual license:
       Serial number:  501506200495
         Licensed to:  Harvard-MIT Data Center
                       Cambridge, MA

Notes:
      1.  Stata is running in batch mode.
      2.  Unicode is supported; see help unicode_advice.
      3.  More than 2 billion observations are allowed; see help obs_advice.
      4.  Maximum number of variables is set to 5000; see help set_maxvar.

. do "dofiles/4_estimates_figure5.do" 

. /*
> Replication files for "Housing Discrimination and the Pollution Exposure Gap 
> in the United States" 
> */
. 
. 
. clear all

. set matsize 11000

. 
. use "../stores/toxic_discrimination_data.dta"

. 
. 
. keep if sample==1
(801 observations deleted)

. 
. loc quartiles 4

. 
. set seed 1010101

. *****************************************************************************
> *******************
. * Above vs Below Median Rent
. *****************************************************************************
> *******************
. 
. egen quartileZIP_rent=xtile(rent), n(2) by(Zip_Code)  
(27 missing values generated)

. 
. 
. forvalues i = 1/2{
  2.         gen rent_dec`i'=(quartileZIP_rent==`i')
  3. }

. 
. forvalues i = 2/`quartiles'{
  2.         forvalues j = 1/2{
  3.                 gen Minority_dec`i'_rent_dec`j'=Minority*dec`i'*rent_dec`j
> '
  4.         }
  5. }

. 
. 
. 
. disc_boot choice  Minority_dec2_rent_dec1  Minority_dec3_rent_dec1  Minority_
> dec4_rent_dec1 ///
>                           Minority_dec2_rent_dec2  Minority_dec3_rent_dec2  M
> inority_dec4_rent_dec2 ///
>                                           , varlist(i.gender i.education_leve
> l i.order)
note: multiple positive outcomes within groups encountered.
note: 1,331 groups (3,993 obs) dropped because of all positive or
      all negative outcomes.

Iteration 0:   log pseudolikelihood = -925.98144  
Iteration 1:   log pseudolikelihood = -915.43739  
Iteration 2:   log pseudolikelihood = -915.41201  
Iteration 3:   log pseudolikelihood = -915.41201  

Conditional (fixed-effects) logistic regression

                                                Number of obs     =      2,730
                                                Wald chi2(11)     =    1703.19
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -915.41201               Pseudo R2         =     0.0843

                              (Std. Err. adjusted for 14 clusters in Zip_Code)
------------------------------------------------------------------------------
             |               Robust
      choice |      Coef.   Std. Err.      z    P>|z|     [90% Conf. Interval]
-------------+----------------------------------------------------------------
~2_rent_dec1 |  -.3946703   .2620289    -1.51   0.132    -.8256695    .0363289
~3_rent_dec1 |  -.4222219   .1485255    -2.84   0.004    -.6665246   -.1779191
~4_rent_dec1 |    .326226   .1126883     2.89   0.004     .1408703    .5115818
~2_rent_dec2 |  -.5889351    .114931    -5.12   0.000    -.7779798   -.3998904
~3_rent_dec2 |  -.2627662   .1910761    -1.38   0.169    -.5770584     .051526
~4_rent_dec2 |  -.0441354    .243392    -0.18   0.856    -.4444796    .3562088
             |
      gender |
       male  |  -.3088048   .0900372    -3.43   0.001    -.4569028   -.1607068
             |
education_~l |
        low  |  -.1692127   .1159377    -1.46   0.144    -.3599133    .0214879
     medium  |   -.303121   .1383229    -2.19   0.028    -.5306419      -.0756
             |
       order |
          2  |  -.3338558   .2449915    -1.36   0.173     -.736831    .0691194
          3  |  -.9035749   .2001767    -4.51   0.000    -1.232836   -.5743135
------------------------------------------------------------------------------
cluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codeclus
> ter(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Code

Bootstrap Corrected Estimates
------------------------------------------------------------------------------
             |      Coef.   Std. Err.      t    P>|t|     [90% Conf. Interval]
-------------+----------------------------------------------------------------
~2_rent_dec1 |  -.3946703   .2434115    -1.62   0.129    -.8257359    .0363953
~3_rent_dec1 |  -.4222219   .1447988    -2.92   0.012    -.6786508   -.1657929
~4_rent_dec1 |    .326226   .1259704     2.59   0.022     .1031409    .5493112
~2_rent_dec2 |  -.5889351   .1491203    -3.95   0.002    -.8530172    -.324853
~3_rent_dec2 |  -.2627662   .1916253    -1.37   0.194    -.6021219    .0765895
~4_rent_dec2 |  -.0441354   .2435019    -0.18   0.859     -.475361    .3870902
------------------------------------------------------------------------------

. 
. mat def b=e(b)

. mat def V=e(V)

. *Matrices for boottest estimates
. *Low Rent
. mat def L_R=J(3,3,.)

. forvalues i= 1/3{
  2.         mat L_R[`i',1]=b[1,`i']
  3.         mat L_R[`i',2]=V[`i',`i']
  4.         mat L_R[`i',3]=e(df_`i')
  5.         }

. 
. *High Rent      
. mat def H_R=J(3,3,.)

. forvalues i= 4/6{
  2.         loc j=`i'-3
  3.         mat H_R[`j',1]=b[1,`i']
  4.         mat H_R[`j',2]=V[`i',`i']
  5.         mat H_R[`j',3]=e(df_`i')
  6.         }

. 
. 
. 
. matrix define B=J(`quartiles'-1,5,.)

. 
. forvalues j = 2/`quartiles'{
  2.         loc i=  `j'-1
  3.         matrix B[`i',1] = L_R[`i',1] - invttail(L_R[`i',3],0.05)*sqrt(L_R[
> `i',2])
  4.         matrix B[`i',2] = L_R[`i',1] 
  5.         matrix B[`i',3] = L_R[`i',1] + invttail(L_R[`i',3],0.05)*sqrt(L_R[
> `i',2])
  6. 
.         *sum Minority_dec`j'_rent_dec1
.         *matrix B[`i',4]=`r(sum)'
.         sum Minority if dec`j'==1
  7.         matrix B[`i',4]=`r(N)'
  8.         sum choice if White==1 &  dec`j'==1
  9.         matrix B[`i',5]=`r(mean)'
 10. 
.         mat list B
 11.         
. }

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    Minority |      1,800    .6666667    .4715355          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |        600    .3916667    .4885301          0          1

B[3,5]
            c1          c2          c3          c4          c5
r1  -.82573593  -.39467031    .0363953        1800   .39166667
r2           .           .           .           .           .
r3           .           .           .           .           .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    Minority |      3,342    .6666667    .4714751          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |      1,114    .4156194    .4930498          0          1

B[3,5]
            c1          c2          c3          c4          c5
r1  -.82573593  -.39467031    .0363953        1800   .39166667
r2  -.67865084  -.42222188  -.16579292        3342   .41561939
r3           .           .           .           .           .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    Minority |      1,581    .6666667    .4715537          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |        527    .3529412    .4783387          0          1

B[3,5]
            c1          c2          c3          c4          c5
r1  -.82573593  -.39467031    .0363953        1800   .39166667
r2  -.67865084  -.42222188  -.16579292        3342   .41561939
r3   .10314086   .32622604   .54931123        1581   .35294118

. 
. 
. *--------------------------------------------------------------------
. preserve

. clear

. svmat B
number of observations will be reset to 3
Press any key to continue, or Break to abort
number of observations (_N) was 0, now 3

. gen n=_n

. replace B1=exp(B1)
(3 real changes made)

. replace B2=exp(B2)
(3 real changes made)

. replace B3=exp(B3)
(3 real changes made)

. 
. 
. rename B1 lci

. rename B2 or

. rename B3 uci

. 
. rename n deciles

. 
. 
. save "../stores/aux/interquartile_toxconc_minority_rent_low_bootcl.dta", repl
> ace
(note: file ../stores/aux/interquartile_toxconc_minority_rent_low_bootcl.dta no
> t found)
file ../stores/aux/interquartile_toxconc_minority_rent_low_bootcl.dta saved

. restore

. *--------------------------------------------------------------------
. 
. 
. 
. 
. matrix define B=J(`quartiles'-1,5,.)

. 
. forvalues j = 2/`quartiles'{
  2.         loc i=  `j'-1
  3.         matrix B[`i',1] = H_R[`i',1] - invttail(H_R[`i',3],0.05)*sqrt(H_R[
> `i',2])
  4.         matrix B[`i',2] = H_R[`i',1] 
  5.         matrix B[`i',3] = H_R[`i',1] + invttail(H_R[`i',3],0.05)*sqrt(H_R[
> `i',2])
  6. 
.         *sum Minority_dec`j'_rent_dec2
.         *matrix B[`i',4]=`r(sum)'
.         sum Minority if dec`j'==1
  7.         matrix B[`i',4]=`r(N)'
  8.         sum choice if White==1 &  dec`j'==1
  9.         matrix B[`i',5]=`r(mean)'
 10.         
.         
.         mat list B
 11.         
. }

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    Minority |      1,800    .6666667    .4715355          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |        600    .3916667    .4885301          0          1

B[3,5]
            c1          c2          c3          c4          c5
r1  -.85301721  -.58893508  -.32485295        1800   .39166667
r2           .           .           .           .           .
r3           .           .           .           .           .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    Minority |      3,342    .6666667    .4714751          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |      1,114    .4156194    .4930498          0          1

B[3,5]
            c1          c2          c3          c4          c5
r1  -.85301721  -.58893508  -.32485295        1800   .39166667
r2  -.60212185  -.26276617   .07658951        3342   .41561939
r3           .           .           .           .           .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    Minority |      1,581    .6666667    .4715537          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |        527    .3529412    .4783387          0          1

B[3,5]
            c1          c2          c3          c4          c5
r1  -.85301721  -.58893508  -.32485295        1800   .39166667
r2  -.60212185  -.26276617   .07658951        3342   .41561939
r3  -.47536101  -.04413542   .38709018        1581   .35294118

. 
. 
. *--------------------------------------------------------------------
. preserve

. clear

. svmat B
number of observations will be reset to 3
Press any key to continue, or Break to abort
number of observations (_N) was 0, now 3

. gen n=_n

. replace B1=exp(B1)
(3 real changes made)

. replace B2=exp(B2)
(3 real changes made)

. replace B3=exp(B3)
(3 real changes made)

. 
. 
. 
. rename B1 lci

. rename B2 or

. rename B3 uci

. 
. rename n deciles

. 
. 
. save "../stores/aux/interquartile_toxconc_minority_rent_high_bootcl.dta", rep
> lace
(note: file ../stores/aux/interquartile_toxconc_minority_rent_high_bootcl.dta n
> ot found)
file ../stores/aux/interquartile_toxconc_minority_rent_high_bootcl.dta saved

. restore

. *--------------------------------------------------------------------
. 
. 
. *****************************************************************************
> *******************
. * Demographinc Composition, Above vs Below Minority Shares
. *****************************************************************************
> *******************
. gen minorityshare=blackshare+hispanicshare 

. egen quartileZIP_minority_share=xtile(minorityshare), n(2) by(Zip_Code)  

. 
. mean minorityshare, over(quartileZIP_minority_share)

Mean estimation                   Number of obs   =      6,723

            1: quartileZIP_minority_share = 1
            2: quartileZIP_minority_share = 2

---------------------------------------------------------------
         Over |       Mean   Std. Err.     [95% Conf. Interval]
--------------+------------------------------------------------
minorityshare |
            1 |   .2415784   .0045433       .232672    .2504847
            2 |   .4944313   .0059543       .482759    .5061036
---------------------------------------------------------------

. 
. *Decile 1 Low share of minority
. *Decile 2 High share of minority
. 
. forvalues i = 1/2{
  2.         gen w_share_dec`i'=(quartileZIP_minority_share==`i')
  3. }

. 
. 
. forvalues i = 2/`quartiles'{
  2.         forvalues j = 1/2{
  3.                 gen Minority_dec`i'_w_share_dec`j'=Minority*dec`i'*w_share
> _dec`j'
  4.         }
  5. }

. 
. 
. 
. 
. disc_boot choice  Minority_dec2_w_share_dec1  Minority_dec3_w_share_dec1  Min
> ority_dec4_w_share_dec1 ///
>                           Minority_dec2_w_share_dec2  Minority_dec3_w_share_d
> ec2  Minority_dec4_w_share_dec2 ///
>                                           , varlist(i.gender i.education_leve
> l i.order)
note: multiple positive outcomes within groups encountered.
note: 1,331 groups (3,993 obs) dropped because of all positive or
      all negative outcomes.

Iteration 0:   log pseudolikelihood = -923.44769  
Iteration 1:   log pseudolikelihood = -913.60365  
Iteration 2:   log pseudolikelihood = -913.58036  
Iteration 3:   log pseudolikelihood = -913.58036  

Conditional (fixed-effects) logistic regression

                                                Number of obs     =      2,730
                                                Wald chi2(11)     =     192.85
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -913.58036               Pseudo R2         =     0.0862

                              (Std. Err. adjusted for 14 clusters in Zip_Code)
------------------------------------------------------------------------------
             |               Robust
      choice |      Coef.   Std. Err.      z    P>|z|     [90% Conf. Interval]
-------------+----------------------------------------------------------------
Minority_d.. |  -.3226122   .1824119    -1.77   0.077    -.6226531   -.0225713
Minority_d.. |  -.3525415   .1808684    -1.95   0.051    -.6500435   -.0550395
Minority_d.. |   .4022004   .1877603     2.14   0.032     .0933621    .7110387
Minority_d.. |  -.9162641   .2092687    -4.38   0.000    -1.260481   -.5720477
Minority_d.. |  -.3436292   .1751896    -1.96   0.050    -.6317905    -.055468
Minority_d.. |  -.0526783   .1775167    -0.30   0.767    -.3446673    .2393106
             |
      gender |
       male  |  -.3074287    .087441    -3.52   0.000    -.4512563   -.1636011
             |
education_~l |
        low  |  -.1673303   .1142622    -1.46   0.143    -.3552748    .0206143
     medium  |   -.297747    .134853    -2.21   0.027    -.5195605   -.0759335
             |
       order |
          2  |  -.3365283   .2453391    -1.37   0.170    -.7400753    .0670186
          3  |  -.9014542   .1996287    -4.52   0.000    -1.229814   -.5730943
------------------------------------------------------------------------------
cluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codeclus
> ter(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Code

Bootstrap Corrected Estimates
------------------------------------------------------------------------------
             |      Coef.   Std. Err.      t    P>|t|     [90% Conf. Interval]
-------------+----------------------------------------------------------------
Minority_d.. |  -.3226122   .2117886    -1.52   0.152    -.6976758    .0524514
Minority_d.. |  -.3525415   .1829005    -1.93   0.076    -.6764462   -.0286368
Minority_d.. |   .4022004   .2105124     1.91   0.078      .029397    .7750038
Minority_d.. |  -.9162641   .2932511    -3.12   0.008    -1.435592   -.3969359
Minority_d.. |  -.3436292   .1902166    -1.81   0.094    -.6804901   -.0067684
Minority_d.. |  -.0526783   .1738181    -0.30   0.767    -.3604985    .2551419
------------------------------------------------------------------------------

. 
. mat def b=e(b)

. mat def V=e(V)

. 
. *Matrices for boottest estimates
. *Low Share
. mat def L_S=J(3,3,.)

. forvalues i= 1/3{
  2.         mat L_S[`i',1]=b[1,`i']
  3.         mat L_S[`i',2]=V[`i',`i']
  4.         mat L_S[`i',3]=e(df_`i')
  5.         }

. 
. *High Share     
. mat def H_S=J(3,3,.)

. forvalues i= 4/6{
  2.         loc j=`i'-3
  3.         mat H_S[`j',1]=b[1,`i']
  4.         mat H_S[`j',2]=V[`i',`i']
  5.         mat H_S[`j',3]=e(df_`i')
  6.         }

. 
. 
. *Decile 1 Low share of minority
. 
. 
. matrix define B=J(`quartiles'-1,5,.)

. 
. forvalues j = 2/`quartiles'{
  2.         loc i=  `j'-1
  3.         matrix B[`i',1] = L_S[`i',1] - invttail(L_S[`i',3],0.05)*sqrt(L_S[
> `i',2])
  4.         matrix B[`i',2] = L_S[`i',1] 
  5.         matrix B[`i',3] = L_S[`i',1] + invttail(L_S[`i',3],0.05)*sqrt(L_S[
> `i',2])
  6. 
.         *sum Minority_dec`j'_w_share_dec1
.         *matrix B[`i',4]=`r(sum)'
.         sum Minority if dec`j'==1
  7.         matrix B[`i',4]=`r(N)'
  8.         sum choice if White==1 &  dec`j'==1
  9.         matrix B[`i',5]=`r(mean)'
 10.         
.         mat list B
 11.         
. }

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    Minority |      1,800    .6666667    .4715355          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |        600    .3916667    .4885301          0          1

B[3,5]
            c1          c2          c3          c4          c5
r1   -.6976758  -.32261222   .05245137        1800   .39166667
r2           .           .           .           .           .
r3           .           .           .           .           .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    Minority |      3,342    .6666667    .4714751          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |      1,114    .4156194    .4930498          0          1

B[3,5]
            c1          c2          c3          c4          c5
r1   -.6976758  -.32261222   .05245137        1800   .39166667
r2  -.67644618  -.35254151  -.02863684        3342   .41561939
r3           .           .           .           .           .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    Minority |      1,581    .6666667    .4715537          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |        527    .3529412    .4783387          0          1

B[3,5]
            c1          c2          c3          c4          c5
r1   -.6976758  -.32261222   .05245137        1800   .39166667
r2  -.67644618  -.35254151  -.02863684        3342   .41561939
r3   .02939703   .40220041   .77500378        1581   .35294118

. 
. 
. *--------------------------------------------------------------------
. preserve

. clear

. svmat B
number of observations will be reset to 3
Press any key to continue, or Break to abort
number of observations (_N) was 0, now 3

. gen n=_n

. replace B1=exp(B1)
(3 real changes made)

. replace B2=exp(B2)
(3 real changes made)

. replace B3=exp(B3)
(3 real changes made)

. 
. 
. 
. rename B1 lci

. rename B2 or

. rename B3 uci

. 
. rename n deciles

. 
. 
. save "../stores/aux/interquartile_toxconc_minority_w_share_low_bootcl.dta", r
> eplace
(note: file ../stores/aux/interquartile_toxconc_minority_w_share_low_bootcl.dta
>  not found)
file ../stores/aux/interquartile_toxconc_minority_w_share_low_bootcl.dta saved

. restore

. *--------------------------------------------------------------------
. 
. *Decile 2 High share of minority
. 
. matrix define B=J(`quartiles'-1,5,.)

. 
. forvalues j = 2/`quartiles'{
  2.         loc i=  `j'-1
  3.         matrix B[`i',1] = H_S[`i',1] - invttail(H_S[`i',3],0.05)*sqrt(H_S[
> `i',2])
  4.         matrix B[`i',2] = H_S[`i',1] 
  5.         matrix B[`i',3] = H_S[`i',1] + invttail(H_S[`i',3],0.05)*sqrt(H_S[
> `i',2])
  6. 
.         *sum Minority_dec`j'_w_share_dec2
.         *matrix B[`i',4]=`r(sum)'
.         sum Minority if dec`j'==1
  7.         matrix B[`i',4]=`r(N)'
  8.         sum choice if White==1 &  dec`j'==1
  9.         matrix B[`i',5]=`r(mean)'
 10. 
.         mat list B
 11.         
. }

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    Minority |      1,800    .6666667    .4715355          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |        600    .3916667    .4885301          0          1

B[3,5]
            c1          c2          c3          c4          c5
r1  -1.4355924  -.91626413  -.39693589        1800   .39166667
r2           .           .           .           .           .
r3           .           .           .           .           .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    Minority |      3,342    .6666667    .4714751          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |      1,114    .4156194    .4930498          0          1

B[3,5]
            c1          c2          c3          c4          c5
r1  -1.4355924  -.91626413  -.39693589        1800   .39166667
r2   -.6804901  -.34362925   -.0067684        3342   .41561939
r3           .           .           .           .           .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    Minority |      1,581    .6666667    .4715537          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |        527    .3529412    .4783387          0          1

B[3,5]
            c1          c2          c3          c4          c5
r1  -1.4355924  -.91626413  -.39693589        1800   .39166667
r2   -.6804901  -.34362925   -.0067684        3342   .41561939
r3  -.36049853  -.05267831   .25514191        1581   .35294118

. 
. 
. *--------------------------------------------------------------------
. preserve

. clear

. svmat B
number of observations will be reset to 3
Press any key to continue, or Break to abort
number of observations (_N) was 0, now 3

. gen n=_n

. replace B1=exp(B1)
(3 real changes made)

. replace B2=exp(B2)
(3 real changes made)

. replace B3=exp(B3)
(3 real changes made)

. 
. 
. 
. rename B1 lci

. rename B2 or

. rename B3 uci

. 
. rename n deciles

. 
. 
. save "../stores/aux/interquartile_toxconc_minority_w_share_high_bootcl.dta", 
> replace
(note: file ../stores/aux/interquartile_toxconc_minority_w_share_high_bootcl.dt
> a not found)
file ../stores/aux/interquartile_toxconc_minority_w_share_high_bootcl.dta saved

. restore

. 
. 
. *****************************************************************************
> *******************
. * Matched Sample
. *****************************************************************************
> *******************/
. 
. 
. 
. preserve

. keep if matched_sample==1
(2,898 observations deleted)

. 
. 
. loc quartiles 4

. 
. disc_boot choice  Minority_dec2 Minority_dec3 Minority_dec4 ///
>                                           , varlist(i.gender i.education_leve
> l i.order)
note: multiple positive outcomes within groups encountered.
note: 773 groups (2,319 obs) dropped because of all positive or
      all negative outcomes.

Iteration 0:   log pseudolikelihood = -514.24581  
Iteration 1:   log pseudolikelihood = -510.15222  
Iteration 2:   log pseudolikelihood = -510.14526  
Iteration 3:   log pseudolikelihood = -510.14526  

Conditional (fixed-effects) logistic regression

                                                Number of obs     =      1,506
                                                Wald chi2(8)      =     159.53
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -510.14526               Pseudo R2         =     0.0750

                              (Std. Err. adjusted for 14 clusters in Zip_Code)
------------------------------------------------------------------------------
             |               Robust
      choice |      Coef.   Std. Err.      z    P>|z|     [90% Conf. Interval]
-------------+----------------------------------------------------------------
Minor~y_dec2 |  -.4771932    .166087    -2.87   0.004    -.7503821   -.2040044
Minority_d~3 |    -.24827   .2133251    -1.16   0.245    -.5991586    .1026186
Minority_d~4 |   .0299836   .1365172     0.22   0.826    -.1945672    .2545344
             |
      gender |
       male  |  -.2285982   .0995584    -2.30   0.022    -.3923572   -.0648393
             |
education_~l |
        low  |  -.1819662   .1143288    -1.59   0.111    -.3700204     .006088
     medium  |  -.4349609   .1959762    -2.22   0.026     -.757313   -.1126088
             |
       order |
          2  |  -.4090957   .1964746    -2.08   0.037    -.7322676   -.0859238
          3  |  -.8679598   .2133541    -4.07   0.000    -1.218896   -.5170236
------------------------------------------------------------------------------
cluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Codecluster(Zip_Code)Zip_Code

Bootstrap Corrected Estimates
------------------------------------------------------------------------------
             |      Coef.   Std. Err.      t    P>|t|     [90% Conf. Interval]
-------------+----------------------------------------------------------------
Minor~y_dec2 |  -.4771932   .1764279    -2.70   0.018    -.7896353   -.1647512
Minority_d~3 |    -.24827   .2040116    -1.22   0.245     -.609561     .113021
Minority_d~4 |   .0299836   .1376779     0.22   0.831    -.2138348     .273802
------------------------------------------------------------------------------

. 
. mat def b=e(b)

. mat def V=e(V)

. 
. mat def C=J(3,3,.)

. forvalues i= 1/3{
  2.         mat C[`i',1]=b[1,`i']
  3.         mat C[`i',2]=V[`i',`i']
  4.         mat C[`i',3]=e(df_`i')
  5.         }

. 
. 
. loc quartiles 4

. matrix define M=J(`quartiles'-1,5,.)

. forvalues j = 2/`quartiles'{
  2.         loc i=  `j'-1
  3.                 
.         matrix M[`i',1] = C[`i',1] - invttail(C[`i',3],0.05)*sqrt(C[`i',2])
  4.         matrix M[`i',2] = C[`i',1] 
  5.         matrix M[`i',3] = C[`i',1] + invttail(C[`i',3],0.05)*sqrt(C[`i',2]
> )
  6. 
.         sum Minority if dec`j'==1
  7.         matrix M[`i',4]=`r(N)'
  8.         sum choice if White==1 &  dec`j'==1
  9.         matrix M[`i',5]=`r(mean)'
 10.         
.         mat list M
 11. 
. }

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    Minority |      1,275    .6666667    .4715895          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |        425          .4    .4904753          0          1

M[3,5]
            c1          c2          c3          c4          c5
r1  -.78963527  -.47719323  -.16475119        1275          .4
r2           .           .           .           .           .
r3           .           .           .           .           .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    Minority |      1,275    .6666667    .4715895          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |        425    .4023529    .4909503          0          1

M[3,5]
            c1          c2          c3          c4          c5
r1  -.78963527  -.47719323  -.16475119        1275          .4
r2  -.60956099  -.24827001   .11302098        1275   .40235294
r3           .           .           .           .           .

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    Minority |      1,275    .6666667    .4715895          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      choice |        425    .3694118    .4832144          0          1

M[3,5]
            c1          c2          c3          c4          c5
r1  -.78963527  -.47719323  -.16475119        1275          .4
r2  -.60956099  -.24827001   .11302098        1275   .40235294
r3  -.21383481    .0299836   .27380201        1275   .36941176

. restore

. 
. *--------------------------------------------------------------------
. preserve

. clear

. svmat M
number of observations will be reset to 3
Press any key to continue, or Break to abort
number of observations (_N) was 0, now 3

. gen n=_n

. replace M1=exp(M1)
(3 real changes made)

. replace M2=exp(M2)
(3 real changes made)

. replace M3=exp(M3)
(3 real changes made)

. 
. 
. rename M1 lci

. rename M2 or

. rename M3 uci

. 
. 
. rename n deciles

. 
. 
. save "../stores/aux/interquartile_toxconc_minority_matched_bootcl.dta", repla
> ce
(note: file ../stores/aux/interquartile_toxconc_minority_matched_bootcl.dta not
>  found)
file ../stores/aux/interquartile_toxconc_minority_matched_bootcl.dta saved

. restore

. 
. *end
. 
end of do-file
